#include <stdio.h>
#include <dirent.h>
#include <sys/types.h>

int main(){
    DIR* mydir = opendir("./ls");
    if(mydir == NULL){
        perror("opendir");
    }
    struct dirent* entry;
    while((entry = readdir(mydir)) != NULL){
        printf("%s\n", entry->d_name);
    }

    closedir(mydir);
    return 0;
}